{% if file_type == "group_list" %}
    <div class="col-md-12">
        <div class="group-div">
            <a class="tag-link" href="/file/group/ungrouped">未分类</a>
        </div>
        {% for item in files %}
            <div class="group-div">
                <a class="tag-link" href="/file/view?id={{item.id}}">{{item.name}}</a>
                {{item.size}}
            </div>
        {% end %}
    </div>
{% else %}
    <div class="x-dialog x-dialog-remote" style="height: 400px;">
        <div class="x-dialog-title">移动分组 <input type="button" class="x-dialog-close" value="关闭"/></div>
        <div>
        {% for item in filelist %}
        <span class="tag-span-light">
            <a href="javascript:moveTo({{id}}, {{item.id}})"><span>{{item.name}}</span></a>
        </span>
        {% end %}
        </div>
    </div>

    <script type="text/javascript">
        
    function moveTo(selfId, parentId) {
        $.post("/file/group/move", 
            {id:selfId, parent_id: parentId}, 
            function (resp){
                console.log(resp);
                window.location.reload();
        });
    }

    </script>
{% end %}
